using Volo.Abp.Autofac;
using Volo.Abp.Modularity;
using WL.Think.Abp.Modules;

namespace WL.Think.Abp;

[DependsOn(
    typeof(AbpAutofacModule)
)]
public abstract class ThinkAbpDbMigratorModule : ThinkModule<ThinkAbpDbMigratorModule>
{
    protected override void PreConfigureDbContext(ServiceConfigurationContext context)
    {
        context.ConfigurePgTimestamp();
    }

    protected override void ConfigureOptions(ServiceConfigurationContext context)
    {
        Configure<ThinkDbMigratorOptions>(context.Configuration.GetSection(ThinkDbMigratorOptions.NodeName));
    }
}
